var display = setInterval(function(){
    fn()
},2500)
var motaikuang = document.querySelector('.motaikuang');
var clock = document.querySelector('.clock');
var closee = document.querySelector('.close');
var a1 = document.getElementById('a1')
var a2 = document.getElementById('a2')
var a3 = document.getElementById('a3')
var a4 = document.getElementById('a4')
var btn = document.querySelector('.btn')
var time = 3

a1.onclick = function(){
    window.location.href = 'seacopy.html'
}
a2.onclick = function(){
    window.location.href = 'bear1.html'
}
a3.onclick = function(){
    window.location.href = 'daxiang1.html'
}
a4.onclick = function(){
    window.location.href = 'mooncopy.html'
}
btn.onclick = function(){
    window.location.href = 'sea.html'
}

closee.onclick = function(){
    motaikuang.style.display = 'none'
    clearInterval(display)
    closee.innerHTML = '这里有BUG我来不及改,关不了'
}

function fn(){		
    
    var timer = setInterval(function(){
        if(time == 0){
            motaikuang.style.display = 'block'
            clock.style.display = 'none'
        } else {
            clock.style.width = '100px'
            clock.style.borderRadius = '50%'
            clock.style.fontWeight = '700'
            clock.style.fontSize = '5.8rem'
            clock.innerHTML = time
            time--
        }
    },1000)		
    
}